<template>
  <div class="top-nav w-full h-24 flex justify-center items-center">
    <h1
      class="w-1/3 text-ellipsis text-center text-nowrap overflow-hidden whitespace-normal text-2xl font-bold text-white tracking-widest"
    >
      {{ title }}
    </h1>
  </div>
</template>

<script>
export default defineComponent({
  name: 'TopNav',
  props: {
    title: {
      type: String,
      default: 'Data View Title'
    }
  },
  setup(props) {
    return {
      title: props.title
    };
  }
});
</script>

<style lang="scss" scoped>
// 设置导航栏背景图片
.top-nav {
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-image: url('@/assets/images/head_bg.png');
}
</style>
